package net.easyjava.third;

/**
 * Created by wxnacy on 16/11/24.
 */
public abstract class AccessClient {

    private volatile static AccessClient singleton;
    private String accessId;
    private String accessKey;
    private AccessClient(final String accessId, final String accessKey) {
        this.accessId = accessId;
        this.accessKey = accessKey;
    }
    public static AccessClient getInstance(final String accessId, final String accessKey) {
        if (singleton == null) {
            synchronized (AccessClient.class) {
                if (singleton == null) {
//                    singleton = new AccessClient(accessId, accessKey);
                }
            }
        }
        return singleton;
    }

    abstract void initClient();
}
